package com.jk.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
/*1* @Return *
2* @Author: lxb
3* @Description:
4* @Date: 2022/11/2 15:43
5 * @param null
6:
**/

@TableName("orderTab")
@Data
@Document(value = "order")
public class OrderEntity implements Serializable {

    @TableId(type = IdType.AUTO)
    @Id
    @Field(type = FieldType.Integer)
    private Integer orderid;

    private Integer proId;
    private Double price;

    private String proname;
    private String products;
    private String proimg;
    private String definite;
    private String brand;
    @TableField(exist = false)
    private String ids;
    private Integer buycount;//购买数量
    private Integer goodsstate;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd ", timezone = "GMT+8")
    private String buyDate;
    private Double totalPrice;

    private Integer userId;
    private Integer orderType;
}
